package top.lgd.base;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Size;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author YYJ
 * @version 1.0
 * @since 2023/12/15 9:53
 */
@Getter
@Setter
public class LgdEntity implements Serializable {

    private static final long serialVersionUID = 3835678848146189848L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 状态 1正常 0停用
     */
    @Size(max = 2)
    private String status;

    /**
     * 备注
     */
    @Size(max = 256)
    private String remark;

    /**
     * 数据归属用户
     */
    private Long dataUserId;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private long current = 1;
    @TableField(exist = false)
    private long pageSize = 10;
}